//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __SERVICEKIT_H__
#define __SERVICEKIT_H__

#include <elasys_server.h>
#include <linknode.h>
#include <aura.h>

class CServiceKit : public DLinkNode
{
public:
     CServiceKit(Aura_ChannelId channelId,
                 IThread * pThread);
     ~CServiceKit();

public:
     static DLinkNode   s_serviceKitsList;
     static Aura_Handle s_hLock;

     static ECode S_CreateKit(
           Aura_ChannelId channelId,
           IThread * pThread);

     static void S_DeleteKit(
           Aura_ChannelId channelId);

     static void S_DeleteAllKits();

     static ECode S_Create();
     static void S_Destroy();

private:
     Aura_ChannelId m_channelId;
     IThread * m_pThread;
};

inline CServiceKit::CServiceKit(
               Aura_ChannelId channelId,
               IThread * pThread)
{
    assert(NULL != pThread);
    assert(-1 != channelId);

    m_channelId = channelId;
    m_pThread = pThread;
}

#endif // __SERVICEKIT_H__

